<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<% String context = request.getContextPath(); %>
<html>
<head>
    <title>流程办理历史</title>
    <link rel="stylesheet" href="<%=context %>/Source/lib/layui/css/layui.css">
</head>

<body style="padding: 0;overflow:hidden;">

<%-- 表格 --%>
<div id="grid">
    <div id="mainGrid" style="margin: -1px; min-width: 680px;"></div>
</div>

<script src="<%=context %>/gooflow/jquery.min.js"></script>
<script src="<%=context %>/microcore/commonjs/utility.js"></script>
<script src="<%=context %>/Source/lib/layui/layui.js"></script>
<script type="text/javascript">
    var path = '<%=context %>';
    var _path = path+"/flow/task";
    var _process = path+"/flow/process";
    var instanceId = '${instanceId}';

    // 表格
    var table;
    layui.use(['table'], function(){

        table = layui.table;

        table.render({
            elem: '#mainGrid'
            , url: _path + "/getHistory?instanceId="+instanceId+"&rnd=" + Math.random() //数据接口
            ,method:'post'
            // , page: true //开启分页
            , cols: [[ //表头
                {field: 'taskName', title: '任务名称', align: 'center', sort: true}
                , {field: 'completeUser', title: '处理人', align: 'center', sort: true}
                , {field: 'remark', title: '处理摘要', align: 'center', sort: true}
                , {field: 'createDateStr', title: '处理时间', align: 'center', sort: true}
            ]]
            ,response: {
                statusCode: 200 //成功的状态码，默认：0
            }
        });
    });


    $(function () {
        $("#grid").height(document.documentElement.clientHeight - $(".toolbar").height());
    });

    function f_load() {
        layui.table.reload('mainGrid', {
            url:  _path + "/getHistory?instanceId="+instanceId+"&rnd=" + Math.random()
        });
    }

</script>
</body>
</html>
